<?php
/**
 * Created by PhpStorm.
 * User: zhang
 * Date: 14-10-23
 * Time: 下午10:30
 */
header('Content-type:text/html;charset=utf-8');
if($_POST['text']){
    $text = $_POST['text'];
    $fp = fopen('./log.txt','a');
    fwrite($fp,$text);
    fclose($fp);
    echo "<script>alert('保存成功');location='index.html';</script>";
}